<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css常见的布局单位</title>
    <style>
        html{
            font-size: 20px;
        }
        body{
            font-size: 18px;
        }
        .box{
            font-size: 26px;
        }
        .px{
            font-size: 26px;
        }
        .em{
            font-size: 2em;
        }
        .rem{
            font-size: 2rem;
        }
        .vwh{
            font-size: 10vh;
            /* width: 3vw;
            height: 3vh; */
        }
        .percent{
            font-size: 100%;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="px">px单位</div>
        <div class="em">em单位</div>
        <div class="rem">rem单位</div>
        <!-- vw vh 是一句视口大小变化  默认是100vh  100 vw -->
        <div class="vwh">vw和vh视口单位</div>
        <div class="percent">百分比单位</div>
    </div>
</body>
</html>